home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / SMILEYC.PAK / SMILEPPG.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  79 lines

  1. // SmilePpg.cpp : Implementation of the CSmilePropPage property page class.
  2.  
  3. #include "stdafx.h"
  4. #include "Smile.h"
  5. #include "SmilePpg.h"
  6.  
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12.  
  13.  
  14. IMPLEMENT_DYNCREATE(CSmilePropPage, COlePropertyPage)
  15.  
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // Message map
  19.  
  20. BEGIN_MESSAGE_MAP(CSmilePropPage, COlePropertyPage)
  21.     //{{AFX_MSG_MAP(CSmilePropPage)
  22.     // NOTE - ClassWizard will add and remove message map entries
  23.     //    DO NOT EDIT what you see in these blocks of generated code !
  24.     //}}AFX_MSG_MAP
  25. END_MESSAGE_MAP()
  26.  
  27.  
  28. /////////////////////////////////////////////////////////////////////////////
  29. // Initialize class factory and guid
  30.  
  31. IMPLEMENT_OLECREATE_EX(CSmilePropPage, "SMILE.SmilePropPage.1",
  32.     0x175cb004, 0xbeed, 0x11ce, 0x96, 0x11, 0, 0xaa, 0, 0x4a, 0x75, 0xcf)
  33.  
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CSmilePropPage::CSmilePropPageFactory::UpdateRegistry -
  37. // Adds or removes system registry entries for CSmilePropPage
  38.  
  39. BOOL CSmilePropPage::CSmilePropPageFactory::UpdateRegistry(BOOL bRegister)
  40. {
  41.     if (bRegister)
  42.         return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
  43.             m_clsid, IDS_Smile_PPG);
  44.     else
  45.         return AfxOleUnregisterClass(m_clsid, NULL);
  46. }
  47.  
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50. // CSmilePropPage::CSmilePropPage - Constructor
  51.  
  52. CSmilePropPage::CSmilePropPage() :
  53.     COlePropertyPage(IDD, IDS_Smile_PPG_CAPTION)
  54. {
  55.     //{{AFX_DATA_INIT(CSmilePropPage)
  56.     m_strCaption = _T("");
  57.     m_bSad = FALSE;
  58.     //}}AFX_DATA_INIT
  59. }
  60.  
  61.  
  62. /////////////////////////////////////////////////////////////////////////////
  63. // CSmilePropPage::DoDataExchange - Moves data between page and properties
  64.  
  65. void CSmilePropPage::DoDataExchange(CDataExchange* pDX)
  66. {
  67.     //{{AFX_DATA_MAP(CSmilePropPage)
  68.     DDP_Text(pDX, IDC_EDIT1, m_strCaption, _T("Caption") );
  69.     DDX_Text(pDX, IDC_EDIT1, m_strCaption);
  70.     DDP_Check(pDX, IDC_CHECK1, m_bSad, _T("Sad") );
  71.     DDX_Check(pDX, IDC_CHECK1, m_bSad);
  72.     //}}AFX_DATA_MAP
  73.     DDP_PostProcessing(pDX);
  74. }
  75.  
  76.  
  77. /////////////////////////////////////////////////////////////////////////////
  78. // CSmilePropPage message handlers
  79.